﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit" xmlns:visualizationToolkit="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit" xmlns:System_Windows_Controls_DataVisualization_Charting_Primitives="clr-namespace:System.Windows.Controls.DataVisualization.Charting.Primitives;assembly=System.Windows.Controls.DataVisualization.Toolkit">
	<!-- Resource dictionary entries should be defined here. -->
	<Style x:Key="AreaSeriesStyle1" TargetType="{x:Type chartingToolkit:AreaSeries}">
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="PathStyle">
			<Setter.Value>
				<Style TargetType="{x:Type Path}">
					<Setter Property="StrokeThickness" Value="2"/>
					<Setter Property="Opacity" Value="0.6"/>
					<Setter Property="Margin" Value="0 5 0 0" />
				</Style>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type chartingToolkit:AreaSeries}">
					<Canvas x:Name="PlotArea">
						<Path Fill="{TemplateBinding Background}" StrokeThickness="3" Style="{TemplateBinding PathStyle}" Data="{TemplateBinding Geometry}"/>
					</Canvas>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>


    <ControlTemplate x:Key="DataPointStyle" TargetType="{x:Type chartingToolkit:AreaDataPoint}">
        <Grid x:Name="Root" Opacity="0">
            <Grid.ToolTip>
                <ContentControl Content="{TemplateBinding FormattedDependentValue}"/>
            </Grid.ToolTip>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="00:00:00.1000000"/>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverHighlight" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFFFDF00"/>
                            </ColorAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverHighlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.24"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="00:00:00.1000000"/>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Unselected"/>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SelectionHighlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.18"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="RevealStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="00:00:00.5000000"/>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Shown">
                        <Storyboard>
                            <DoubleAnimation Duration="00:00:00" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="1"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Hidden">
                        <Storyboard>
                            <DoubleAnimation Duration="00:00:00" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Ellipse x:Name="MainPoint" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" Margin="1"/>
            <Ellipse x:Name="OtherPoint" RenderTransformOrigin="0.661,0.321" Margin="1">
                <Ellipse.Fill>
                    <RadialGradientBrush GradientOrigin="0.681,0.308">
                        <GradientStop Color="Transparent"/>
                        <GradientStop Color="#FF3D3A3A" Offset="1"/>
                    </RadialGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
            <Ellipse x:Name="SelectionHighlight" Fill="Red" Opacity="0"/>
            <Ellipse x:Name="MouseOverHighlight" Fill="White" Opacity="0"/>
            <Ellipse x:Name="ChangingHighlight">
                <Ellipse.Fill>
                    <RadialGradientBrush GradientOrigin="0.681,0.308">
                        <GradientStop Color="Transparent"/>
                        <GradientStop Color="#FF3D3A3A" Offset="1"/>
                    </RadialGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
        </Grid>
    </ControlTemplate>
    
        <Style x:Key="ChartStyle1" TargetType="{x:Type chartingToolkit:Chart}">
		<Setter Property="BorderBrush" Value="Black"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="SnapsToDevicePixels" Value="True"/>
		<Setter Property="StylePalette">
			<Setter.Value>
			    
				<visualizationToolkit:StylePalette>
					<Style TargetType="{x:Type chartingToolkit:AreaDataPoint}">                        
                        <Setter Property="BorderBrush" Value="Gray"/>
                        <Setter Property="BorderThickness" Value="1"/>
                        <Setter Property="IsTabStop" Value="False"/>
                        <Setter Property="Width" Value="6"/>
                        <Setter Property="Height" Value="6"/>
                        <Setter Property="Margin" Value="0 5 0 0" />
						<Setter Property="Background">
							<Setter.Value>
								<RadialGradientBrush>
									<RadialGradientBrush.RelativeTransform>
										<TransformGroup>
											<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.09" ScaleY="1.819"/>
											<TranslateTransform X="-0.425" Y="-0.486"/>
										</TransformGroup>
									</RadialGradientBrush.RelativeTransform>
									<GradientStop Color="#FFB9D6F7"/>
									<GradientStop Color="#FF284B70" Offset="1"/>
								</RadialGradientBrush>
							</Setter.Value>
						</Setter>
                        <Setter Property="Template" Value="{StaticResource DataPointStyle}"/>                            
                    </Style>
					
				</visualizationToolkit:StylePalette>
			</Setter.Value>
		</Setter>
		<Setter Property="TitleStyle">
			<Setter.Value>
				<Style TargetType="{x:Type visualizationToolkit:Title}">
					<Setter Property="FontSize" Value="16"/>
					<Setter Property="HorizontalAlignment" Value="Center"/>					
					<Setter Property="Visibility" Value="Collapsed" />
				</Style>
			</Setter.Value>
		</Setter>
		<Setter Property="LegendStyle">
			<Setter.Value>
				<Style TargetType="{x:Type visualizationToolkit:Legend}">
					<Setter Property="Margin" Value="15,0"/>
					<Setter Property="VerticalAlignment" Value="Center"/>
					<Setter Property="BorderBrush" Value="#FFDBDBDB"/>
					<Setter Property="Visibility" Value="Collapsed" />
					<Setter Property="Background">
						<Setter.Value>
							<LinearGradientBrush EndPoint="0.442,0.005" StartPoint="0.558,0.995">
								<GradientStop Color="#FFDBDBDB"/>
								<GradientStop Color="White" Offset="1"/>
							</LinearGradientBrush>
						</Setter.Value>
					</Setter>
				</Style>
			</Setter.Value>
		</Setter>
		<Setter Property="ChartAreaStyle">
			<Setter.Value>
				<Style TargetType="{x:Type Panel}">
					<Setter Property="MinWidth" Value="100"/>
					<Setter Property="MinHeight" Value="75"/>
				</Style>
			</Setter.Value>
		</Setter>
		<Setter Property="PlotAreaStyle">
			<Setter.Value>
				<Style TargetType="{x:Type Grid}">
					<Setter Property="Background">
						<Setter.Value>
							<LinearGradientBrush EndPoint="0.457,0.296" StartPoint="0.459,1.296">
								<GradientStop Color="#FFCBCBCB"/>
								<GradientStop Color="White" Offset="1"/>
							</LinearGradientBrush>
						</Setter.Value>
					</Setter>
				</Style>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type chartingToolkit:Chart}">
					<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0 0 12 0">
						<Grid Margin="5">
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
							
							<Grid Margin="0" Grid.Row="1">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="*"/>
									<ColumnDefinition Width="Auto"/>
								</Grid.ColumnDefinitions>								
								<System_Windows_Controls_DataVisualization_Charting_Primitives:EdgePanel x:Name="ChartArea" Style="{TemplateBinding ChartAreaStyle}">
									<Grid Style="{TemplateBinding PlotAreaStyle}" Panel.ZIndex="-1" Background="{x:Null}"/>
									<Border Panel.ZIndex="10" BorderBrush="#FF919191" BorderThickness="1" Padding="0" Background="LightGray" Opacity=".2" CornerRadius="5"/>
								</System_Windows_Controls_DataVisualization_Charting_Primitives:EdgePanel>
							</Grid>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>